// index.js
// 获取应用实例
const app = getApp()

Page({
  data: {
    showVoice: false,
    background: ['blue', 'red', 'yellow'],
    indicatorDots: true,
    autoplay: true,  //是否自动切换
    vertical: false,  //
    interval: 10000, //自动切换时间间隔。
    circular: true,  //是否启用无限滑动
    banner:[],
    class:[]
  },

  onLoad() {
    let that = this;
    wx.request({
      url: 'https://openpay.duolaibei.com/mobile/index/banner',
      success(res){
        if(res.data.code == 200){
         that.setData({
          banner : res.data.content
         });
        }
      }
    });
    wx.request({
      url: 'https://openpay.duolaibei.com/mobile/index/getClass',
      success(res){
        if(res.data.code == 200){
         that.setData({
          class : res.data.content
         });
        }
      }
    });
  },
  details(){
    wx.navigateTo({
      url: '/pages/detalis/detalis',
    })
  },
  cat(){
    wx.showToast({
      title: '暂时没有数据',
      icon: 'none'
    })
  }

})
